package com.xxxcompany.blog.dao;

import static org.junit.jupiter.api.Assertions.*;

import java.sql.SQLException;

import org.junit.jupiter.api.Test;

import com.xxxcompany.blog.dao.impl.UserDAOImpl;
import com.xxxcompany.blog.entity.User;

import junit.framework.TestCase;

class IUserDAOTest {

	@Test
	void testInsert() throws SQLException {
		
		
		// 创建DAO层对象
		IUserDAO dao = new UserDAOImpl();
		
		// 执行方法
		int result = dao.insert(new User(0,"qiaolaoba","123456","乔老八","qiaolaoba@qq.com","11111111111",null,"男",null,null));
		
		// 断言
		// 测试结果是否符合要求 不符合抛出异常，测试失败
		TestCase.assertTrue(result>0);
	}

}
